homeApp.service('homeService', ['$http', '$q', 'baseService',
    function ($http, $q, baseService) {
        return {
            //主页右侧更改密码
            changePwd: function (compositePwd) {
                var url = _ctx + '/user/changePwd';
                return baseService.postForm(url, compositePwd);
            },
            //主页获取用户拥有角色
            getMyRoles: function () {
                var url = _ctx + '/role/my';
                return baseService.get(url);
            },
            //主页更改角色
            changeRole: function (roleId) {
                var url = _ctx + '/role/changeRole';
                return baseService.postForm(url, roleId);
            }
        }
    }
]);
